import { defineConfig } from 'vitepress'
import { containerPreview, componentPreview } from '@vitepress-demo-preview/plugin'
// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: "HOWUSE",
  description: "一个好用的vue3组件库",
  themeConfig: {
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      { text: '首页', link: '/' },
      { text: '一个橙子pro', link: 'https://yigechengzi.com/' }
    ],

    sidebar: [
      {
        text: '示例/文档',
        items: [
          { text: '快速入门', link: 'guide.md' },
          {
            text: 'Element-Plus', link: '/element-plus/index.md',
            items: [
              { text: '表单构建', link: '/element-plus/search/index.md' },
              { text: '表格编辑', link: '/element-plus/edit-table/index.md' },
            ]
          },
          { text: 'npm 自动发包', link: '/cimi.md' },
        ]
      }
    ],

    socialLinks: [
      { icon: 'github', link: 'https://gitee.com/bsxbl/howuse' }
    ]
  },
  markdown: {
    config: (md) => {
      md.use(containerPreview)
      md.use(componentPreview)
    }
  },
  locales: {
    root: {
      label: "中文",
      lang: "zh-CN",
      link: "/",
      themeConfig: {
        docFooter: {
          prev: '上一页',
          next: '下一页'
        },
        outline: {
          label: '页面导航'
        },
      }
    }
  }
})
